# while的循环结构，九九乘法表
'''
print("====================while语句 左对齐,方向右下===================")
i=1
while i<=9:
    j=1
    while j<=i:
        print("{}*{}={}".format(i,j,i*j),end=" ")
        j+=1
    print("")
    i+=1

print("====================while语句 左对齐，方向右上=================")

i=9
while 0<i<=9:
    j=1
    while j<=i:
        print("{}*{}={}".format(i,j,i*j),end=" ")
        j+=1
    print("")
    i-=1
    
'''

print("====================while语句 右对齐,方向右上=================")



i=1
while i<=9:
    m=1
    while m<=9-i:
        print("         ",end="")
        m+=1
    j=1
    while j<=i:
        print("{}*{}={:<4}".format(i,j,i*j),end=" ")
        j+=1
    print("")
    i+=1

print("====================while语句 右对齐,方向右上=================")


i=9
while 0<i<=9:
    m=1
    while 0<m<=9-i:
        print("         ",end="")
        m+=1
    j=1
    while 0<j<=i:
        print("{}*{}={:<4}".format(i,j,i*j),end=" ")
        j+=1
    print("")
    i-=1

